package com.hangzhou.welbeing.welbeinginstrument.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.hangzhou.welbeing.welbeinginstrument.R;
import com.hangzhou.welbeing.welbeinginstrument.adapter.ProfilePageFocusedAdapter;
import com.hangzhou.welbeing.welbeinginstrument.utils.Utils;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 时间 2017 年 09 月 10 日
 * 作者  Z2043 welbeing to hangzou com.hangzhou.welbeing.pregnant.welbeing_pregnant.activity
 */
public class ProfilePageFocusedActivity extends Activity {
    @Bind(R.id.activity_profile_page_focused_iv_return)
    ImageView mActivityProfilePageFocusedIvReturn;
    @Bind(R.id.activity_profile_page_focused_rl_iv_head_portrait)
    ImageView mActivityProfilePageFocusedRlIvHeadPortrait;
    @Bind(R.id.activity_profile_page_focused_rl_tv_concrete_circle)
    TextView mActivityProfilePageFocusedRlTvConcreteCircle;
    @Bind(R.id.activity_profile_page_focused_tv_)
    TextView mActivityProfilePageFocusedTv;
    @Bind(R.id.activity_profile_page_focused_ll_attention)
    LinearLayout mActivityProfilePageFocusedLlAttention;
    @Bind(R.id.activity_profile_page_focused_tv_titiles)
    TextView mActivityProfilePageFocusedTvTitiles;
    @Bind(R.id.activity_profile_page_focused_tv_content)
    TextView mActivityProfilePageFocusedTvContent;
    @Bind(R.id.activity_profile_page_focused_tv_date)
    TextView mActivityProfilePageFocusedTvDate;
    @Bind(R.id.activity_profile_page_focused_iv_next_pager)
    ImageView mActivityProfilePageFocusedIvNextPager;
    @Bind(R.id.activity_profile_page_focused_tv_commentaries)
    TextView mActivityProfilePageFocusedTvCommentaries;
    @Bind(R.id.activity_profile_page_focused_rl_commentaries)
    RelativeLayout mActivityProfilePageFocusedRlCommentaries;
    @Bind(R.id.activity_profile_page_focused_ecyclerView)
    RecyclerView mActivityProfilePageFocusedEcyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_profile_page_focused);
        ButterKnife.bind(this);

        Utils.setStatusBar(this,false,false);
        Utils.setStatusTextColor(true,this);

        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        mActivityProfilePageFocusedEcyclerView.setLayoutManager(layoutManager);
        ProfilePageFocusedAdapter profilePageFocusedAdapter = new ProfilePageFocusedAdapter();
        mActivityProfilePageFocusedEcyclerView.setAdapter(profilePageFocusedAdapter);

    }

    @OnClick({R.id.activity_profile_page_focused_iv_return, R.id.activity_profile_page_focused_ll_attention, R.id.activity_profile_page_focused_rl_commentaries,R.id.activity_profile_page_focused_rl_iv_head_portrait})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.activity_profile_page_focused_iv_return:
                finish();
                break;
            case R.id.activity_profile_page_focused_ll_attention://关注
                Intent intent1  =  new Intent(ProfilePageFocusedActivity.this,PersonalArticlesActivity.class);
                startActivity(intent1);
                break;
            case R.id.activity_profile_page_focused_rl_commentaries: //全部评论
                Intent intent2  =  new Intent(ProfilePageFocusedActivity.this,AllCommentsActivity.class);
                startActivity(intent2);
                break;
            case R.id.activity_profile_page_focused_rl_iv_head_portrait:
                Intent intent  =  new Intent(ProfilePageFocusedActivity.this,MyPostingOnCircleActivity.class);
                startActivity(intent);
                break;
        }
    }
}
